package com.cn.qtms.service;//类注释设置模板

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.oauth2.provider.ClientDetails;
import org.springframework.security.oauth2.provider.ClientDetailsService;
import org.springframework.security.oauth2.provider.ClientRegistrationException;
import org.springframework.security.oauth2.provider.client.JdbcClientDetailsService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional(readOnly = true)
/**
 * 客户端登陆校验客户端id和密码
 * @author User
 */
public class JpaClientServiceImpl implements ClientDetailsService {
    @Autowired
    private JdbcClientDetailsService jdbcClientDetailsService;
    @Override
    public ClientDetails loadClientByClientId(String clientId) throws ClientRegistrationException {
        ClientDetails details = jdbcClientDetailsService.loadClientByClientId(clientId);
        return details;
    }
}
